package org.bonorsoft.modules.wechat.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.bonorsoft.modules.wechat.mapper.CodeMapper;
import org.bonorsoft.modules.wechat.service.ICodeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class CodeServiceImpl implements ICodeService {
    @Resource
    private CodeMapper codeMapper;

    /**
     * 添加企业组织机构代码
     *
     * @param username
     * @param code
     * @return
     */
    @Override
    public int addCode(String username, String code) {
        return codeMapper.addCode(username,code);
    }

    /**
     * 获取企业组织机构代码
     *
     * @param username
     * @return
     */
    @Override
    public String getCode(String username) {
        return codeMapper.getCode(username);
    }

    @Override
    public int count(String username) {
        return codeMapper.count(username);
    }
}
